package com.mine.collections;

import org.junit.Test;

import java.util.ArrayList;
import java.util.List;

/**
 * TODO
 *
 * @author wangtonggui
 * @version 1.0.0
 * @since 2021/10/13 17:54
 */
public class ArrayDemos {
  @Test
  public void toArrayTest() {
    List<String> list = new ArrayList<>();
    list.add("123");
    list.add("123");
    list.add("123");
    list.add("123");
    list.add("123");
    String[] strings = list.toArray(new String[0]);
    for (String string : strings) {
      System.out.println(string);
    }
  }
}
